
import Foundation


//MARK: 二叉堆
//BinaryHeap.test()
BinaryHeap<Int>.TopK()


//print(Stack<Character>.isValid2("[]"))


//testLink()

//BinarySearchTree<Int>.testTree()
//AVLTree<Int>.testAVLTree()
//Queue<Int>.testQueue()
//Stack<Int>.testStack()


func testLink() {
    let link = BothWayLinkList<Int>()
//    let link = LinkList<Person>()
//    let link = CircleLinkList<Person>()
//    link.add(element: Person(age: 100))
//    link.remove(element: Person(age: 4))
//    print(link)

    link.add(element: 1)
    link.add(element:2)
    link.add(element:3)
    link.add(element:4)
//    link.add(index: 0, element: Person(age: 0))
//    print(link.indexOfElement(element: Person(age: 1)))
//    link.add(element: Person(age: 3))
//    link.add(element: Person(age: 4))
    link.remove(at: 0)
    print(link)
  
}
